<template>
  <div>
    <div class="taskTitle">开机启动的程序</div>
    <el-table :data="tableData">
      <el-table-column label="名称" prop="title" />
      <el-table-column label="状态" prop="startup" :formatter="fmtStatus"/>
      <el-table-column label="启动影响" prop="weight" :formatter="fmtWeight"/>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "StartUp",
  computed: {
    tableData() {
      let list = this.$store.state.appList
      return list
    }
  },
  methods: {
    //eslint-disable-next-line no-unused-vars
    fmtStatus(row, col, val) {
      return val ? "已启用" : "已禁用"
    },
    //eslint-disable-next-line no-unused-vars
    fmtWeight(row, col, val) {
      let weightMap = {1: "低", 2: "高"}
      return weightMap[val] ? weightMap[val] : "未计量"
    }
  }
}
</script>

<style scoped>

</style>
